package com.tind.tindpracticeapplication;

import android.Manifest;
import android.content.Intent;
import android.view.View;

import com.hjq.permissions.OnPermissionCallback;
import com.hjq.permissions.XXPermissions;
import com.tind.tindpracticeapplication.module.scan.ScanSeleterActivity;
import com.tind.wyf.baselib.base.BaseActivity;

import java.util.List;

public class MainActivity extends BaseActivity implements OnPermissionCallback {

    private static final String[] permissions = new String[]{Manifest.permission.CAMERA, Manifest.permission.READ_EXTERNAL_STORAGE,
            Manifest.permission.WRITE_EXTERNAL_STORAGE};

    @Override
    protected int getLayoutId() {
        return R.layout.activity_main;
    }

    @Override
    protected void initView() {


    }

    @Override
    protected void initData() {
        XXPermissions.with(this).permission(permissions).request(this);
    }

    @Override
    public void onGranted(List<String> list, boolean b) {

    }

    public void scanOnclick(View view) {
        Intent intent = new Intent(this, ScanSeleterActivity.class);
        startActivity(intent);
    }
}